﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace IceDog.DNF.Program.Website
{
    public class LangHelper
    {
        public static void ChangeLanguage()
        {
            var lang = HttpContext.Current.Request.Cookies["lang"]?.Value;
            if (!string.IsNullOrEmpty(lang))
            {
                var culture = new System.Globalization.CultureInfo(lang);
                System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
                System.Threading.Thread.CurrentThread.CurrentCulture = culture;
            }
        }
    }
}